#include <iostream>

using namespace std;
class Rectangle
{
public:
	void getArea()
	{
		cout<<w*h<<endl;
	}
	void getCircle()
	{
		cout<<2*(w+h)<<endl;
	}
private:
	int w;
	int h;
};

class Square:public Rectangle
{
public:
	Square(int _w)
	{
		w=_w;
	}
	void getArea()
	{
		cout<<w*w<<endl;
	}
	void getCircle()
	{
		cout<<4*w<<endl;
	}
private:
	int w;
};
int main()
{
	Square square(8);
	square.getArea();
	square.getCircle();
}